import {Component, OnInit} from '@angular/core';

@Component({
    selector: 'app-authentication',
    templateUrl: './authentication.component.html',
    styleUrls: ['./authentication.component.css']
})
export class AuthenticationComponent implements OnInit {

    display: Boolean;
    checked: boolean = false;
    informationType = true;
    authenticationWay = [
        {type: 'SMS'},
        {type: 'Email'},
    ];
    twoStepAuthentication = {
        authenticationMethod: '',
        notification: '',
        contactInformation: ''
    }
    SMSNotification = [
        {type: 'GSM Proxy'},
        {type: 'GSM Cloud'},
        {type: 'GSM Gateway'},
    ];
    WLANSecurity = [
        {type: 'Open'},
        {type: 'WEP'},
        {type: 'WPA/WPA2 PSK'},
        {type: 'WPA2 PSK'},
    ];

    authenticationInformation = {
        userName: '',
        passWord: '',
    };

    constructor() {

    }

    ngOnInit(): void {
    }

    authenticationWaySwitch() {


        // @ts-ignore
        this.informationType = this.twoStepAuthentication.authenticationMethod.type === 'SMS';
        console.log(this.informationType)
        console.log(this.twoStepAuthentication.authenticationMethod)
    }

    changeAuthentication() {
        this.checked = false;
    }

    applyChange(information) {
        this.display = true;
        console.log(information)
    }

    cancel() {
        this.display = false;
    }

    apply() {
        this.display = false;
    }
}
